package io.renren.modules.app.controller.user.user;

import java.util.Arrays;
import java.util.Map;

import io.renren.modules.app.entity.YcPositionTypeEntity;
import io.renren.modules.app.service.YcPositionTypeService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;



/**
 * 
 *
 * @author lym
 * @email 928185446qq.com
 * @date 2023-12-22 15:38:50
 */
@RestController
@RequestMapping("record/ycpositiontype")
public class YcPositionTypeController {
    @Autowired
    private YcPositionTypeService ycPositionTypeService;

    /**
     * 列表
     */


    /**
     * 信息
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params){
        System.out.println(params);

        return R.ok();
    }

    /**
     * 保存
     */
    @RequestMapping("/save")
    @RequiresPermissions("record:ycpositiontype:save")
    public R save(@RequestBody YcPositionTypeEntity ycPositionType){
		ycPositionTypeService.save(ycPositionType);

        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    @RequiresPermissions("record:ycpositiontype:update")
    public R update(@RequestBody YcPositionTypeEntity ycPositionType){
		ycPositionTypeService.updateById(ycPositionType);

        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    @RequiresPermissions("record:ycpositiontype:delete")
    public R delete(@RequestBody Integer[] ids){
		ycPositionTypeService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}
